#let simple-slide(doc, subtitle: "Subtitle or Description", author: "Your Name") = [

  #set text(
    font: "Libertinus Sans",
    size: 16pt,
    tracking: -0.05em,
  )

  #set page(
    width: 24cm,
    height: 13.5cm,
    margin: (x: 1cm, y: 0.8cm),
    numbering: "1",
    number-align: bottom + right,
  )


  // Title slide rule (for the very first heading)
  #let first-slide = state("first-slide", true)
  
  #show heading.where(level: 1): it => {
    if first-slide.get() {
      first-slide.update(false)
      // Special formatting for title slide
      [
        // Title and subtitle in middle-left
        #align(left + horizon)[
          #text(40pt, weight: "bold", fill: rgb("#2c3e50"))[#it.body]
          #v(-1cm)
          #text(24pt, fill: rgb("#34495e"))[#subtitle]
        ]
        
        // Author and date at bottom-left
        #align(left + bottom)[
          #text(20pt)[#author]
          #v(-0.5cm)
          #text(16pt, fill: rgb("#7f8c8d"))[#datetime.today().display()]
        ]
      ]
    } else {
      // Regular slide formatting for subsequent headings
      pagebreak(weak: true)
      align(top)[
        #v( 0.2cm)
        #text(size: 32pt, weight: "bold", fill: rgb("#2c3e50"))[#it.body]
        #v(-0.2cm)
        #line(length: 100%, stroke: 2pt + rgb("#3498db"))
        #v( 0.2cm)
      ]
    }
  }

  #show heading.where(level: 2): it => [
    #set text(size: 24pt, weight: "bold", fill: rgb("#34495e"))
    #block(above: 0.4em, below: 0.6em, it)
  ]

  #show heading.where(level: 3): it => [
    #set text(size: 20pt, weight: "bold", fill: rgb("#7f8c8d"))
    #block(above: 0.3em, below: 0.4em, it)
  ]

  #doc
]